package fieldmaps.types;

public class RasterMapInfo {

	private char byteOrder;		// Byte order in which image pixel values are stored. 
								// M = Motorola byte order (most significant byte first)
								// I = Intel byte order (least significant byte first)
	private String layout;		// Organization of the bands in the fileBIL = band interleaved by line.
	private int nrows;			// Number of rows in the image.
	private int ncols;			// Number of columns in the image.
	private int nbands;			// Number of spectral bands in the image (1 for all raster layers).
	private int nbits;			// Number of bits per pixel (8, 16 or 32).
	private int bandrowbytes;	// Number of bytes per band per row (twice the number of columns for the 16-bit image; four-times for the 32-bit image).
	private int totalrowbytes;	// Total number of bytes of data per row (twice the number of columns for the 16-bit image; four-times for the 32-bit image).
	private int bandgapbytes;	// The number of bytes between bands in a BSQ format image (0 for all raster layers).
	private int nodata;			// Value used for masking purposes.
	private double ulxmap;		// Longitude of the center of the upper-left pixel (decimal degrees).
	private double ulymap;		// Latitude of the center of the upper-left pixel (decimal degrees).
	private double xdim;		// x-dimension of a pixel (decimal degrees).
	private double ydim;		// y-dimension of a pixel (decimal degrees).

	
	public RasterMapInfo() {
		
	}
	
	public RasterMapInfo(RasterMapInfo mapInfo) {
		this.byteOrder = mapInfo.byteOrder;
		this.layout = new String(mapInfo.layout);
		this.nrows = mapInfo.nrows;
		this.ncols = mapInfo.ncols;
		this.nbands = mapInfo.nbands;
		this.nbits = mapInfo.nbits;
		this.bandrowbytes = mapInfo.bandrowbytes;
		this.totalrowbytes = mapInfo.totalrowbytes;
		this.bandgapbytes = mapInfo.bandgapbytes;
		this.nodata = mapInfo.nodata;
		this.ulxmap = mapInfo.ulxmap;
		this.ulymap = mapInfo.ulymap;
		this.xdim = mapInfo.xdim;
		this.ydim = mapInfo.ydim;
	}

	public char getByteOrder() {
		return byteOrder;
	}

	public void setByteOrder(char byteOrder) {
		this.byteOrder = byteOrder;
	}

	public String getLayout() {
		return layout;
	}

	public void setLayout(String layout) {
		this.layout = layout;
	}

	public int getNrows() {
		return nrows;
	}

	public void setNrows(int nrows) {
		this.nrows = nrows;
	}

	public int getNcols() {
		return ncols;
	}

	public void setNcols(int ncols) {
		this.ncols = ncols;
	}

	public int getNbands() {
		return nbands;
	}

	public void setNbands(int nbands) {
		this.nbands = nbands;
	}

	public int getNbits() {
		return nbits;
	}

	public void setNbits(int nbits) {
		this.nbits = nbits;
	}

	public int getBandrowbytes() {
		return bandrowbytes;
	}

	public void setBandrowbytes(int bandrowbytes) {
		this.bandrowbytes = bandrowbytes;
	}

	public int getTotalrowbytes() {
		return totalrowbytes;
	}

	public void setTotalrowbytes(int totalrowbytes) {
		this.totalrowbytes = totalrowbytes;
	}

	public int getBandgapbytes() {
		return bandgapbytes;
	}

	public void setBandgapbytes(int bandgapbytes) {
		this.bandgapbytes = bandgapbytes;
	}

	public int getNodata() {
		return nodata;
	}

	public void setNodata(int nodata) {
		this.nodata = nodata;
	}

	public double getUlxmap() {
		return ulxmap;
	}

	public void setUlxmap(double ulxmap) {
		this.ulxmap = ulxmap;
	}

	public double getUlymap() {
		return ulymap;
	}

	public void setUlymap(double ulymap) {
		this.ulymap = ulymap;
	}

	public double getXdim() {
		return xdim;
	}

	public void setXdim(double xdim) {
		this.xdim = xdim;
	}

	public double getYdim() {
		return ydim;
	}

	public void setYdim(double ydim) {
		this.ydim = ydim;
	}

	public void showInfo() {

		System.out.println("");
		System.out.println("Map Information:");
		System.out.println("---------- ");
		System.out.println("Byte order in which image pixel values are stored: " + byteOrder);
		System.out.println("Organization of the bands: " + layout);
		System.out.println("Number of rows in the image: " + nrows);
		System.out.println("Number of columns in the image: " + ncols);
		System.out.println("Number of spectral bands in the image: " + nbands);
		System.out.println("Number of bits per pixel: " + nbits);
		System.out.println("Number of bytes per band per row: " + bandrowbytes);
		System.out.println("Total number of bytes of data per row: " + totalrowbytes);
		System.out.println("The number of bytes between bands in a BSQ: " + bandgapbytes);
		System.out.println("Value used for masking purposes: " + nodata);
		System.out.println("Longitude of the center of the upper-left pixel (decimal degrees): " + ulxmap);
		System.out.println("Latitude of the center of the upper-left pixel (decimal degrees): " + ulymap);
		System.out.println("X-Dimension of a pixel (decimal degrees): " + xdim);
		System.out.println("Y-Dimension of a pixel (decimal degrees): " + ydim);
		System.out.println("");
	}
	
}
